<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="bolao" />
  <g:set var="entityName" value="${message(code: 'team.label', default: 'Team')}" />
  <title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
  <div class="body">
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <div class="dialog">
      <fieldset>
        <legend><g:message code="default.show.label" args="[entityName]" /></legend>
        <table>
          <tbody>
            <tr class="prop">
              <td valign="top" class="name"><g:message code="team.name.label" default="Name" />:</td>
              <td valign="top" class="value">${fieldValue(bean:team, field:'name')}</td>
            </tr>
            <tr class="prop">
              <td valign="top" class="name"><g:message code="team.flagImage.label" default="Flag Image" />:</td>
              <td valign="top" class="value">
                <g:if test="${team?.flagImage?.size() > 0}">
                 <img src="<g:createLink controller='team' action='renderFlagImage' id='${team.id}'/>"/>
               </g:if>
              </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="team.group.label" default="Group" />:</td>
            <td valign="top" class="value"><g:link controller="group" action="show" id="${team?.group?.id}">${team?.group?.name?.encodeAsHTML()}</g:link></td>
          </tr>
          <g:ifAnyGranted role="ROLE_ADMIN">
            <tr class="prop">
              <td valign="top" class="name"><g:message code="team.dateCreated.label" default="Date Created" />:</td>
              <td valign="top" class="value"><g:formatDate date="${team?.dateCreated}" /></td>
            </tr>
            <tr class="prop">
              <td valign="top" class="name"><g:message code="team.lastUpdated.label" default="Last Updated" />:</td>
              <td valign="top" class="value"><g:formatDate date="${team?.lastUpdated}" /></td>
            </tr>
            <tr class="prop">
              <td valign="top" class="name"><g:message code="team.createdBy.label" default="Created By" />:</td>
              <td valign="top" class="value"><g:link controller="user" action="show" id="${team?.createdBy?.id}">${team?.createdBy?.username?.encodeAsHTML()}</g:link></td>
            </tr>
            <tr class="prop">
              <td valign="top" class="name"><g:message code="team.updatedBy.label" default="Updated By" />:</td>
              <td valign="top" class="value"><g:link controller="user" action="show" id="${team?.updatedBy?.id}">${team?.updatedBy?.username?.encodeAsHTML()}</g:link></td>
            </tr>
          </g:ifAnyGranted>
          <tr class="prop">
            <td valign="top" class="name">Team Details:</td>
            <td valign="top" class="value">${fieldValue(bean:team, field:'teamDetails')}</td>
          </tr>
          </tbody>
        </table>
      </fieldset>
    </div>
    <div class="buttons">
      <g:form>
        <input type="hidden" name="id" value="${team?.id}" />
        <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
        <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
      </g:form>
    </div>
  </div>
</body>
</html>
